import request from '@/utils/request'

// 创建小程序-供应商
export function createSupplier(data) {
  return request({
    url: '/qd/supplier/create',
    method: 'post',
    data: data
  })
}

// 更新小程序-供应商
export function updateSupplier(data) {
  return request({
    url: '/qd/supplier/update',
    method: 'put',
    data: data
  })
}

// 删除小程序-供应商
export function deleteSupplier(id) {
  return request({
    url: '/qd/supplier/delete?id=' + id,
    method: 'delete'
  })
}

// 获得小程序-供应商
export function getSupplier(id) {
  return request({
    url: '/qd/supplier/get?id=' + id,
    method: 'get'
  })
}

// 获得小程序-供应商分页
export function getSupplierPage(query) {
  return request({
    url: '/qd/supplier/page',
    method: 'get',
    params: query
  })
}

// 导出小程序-供应商 Excel
export function exportSupplierExcel(query) {
  return request({
    url: '/qd/supplier/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
